// photos from flickr with creative commons license

var cy = cytoscape({
  container: document.getElementById('cy'),

  boxSelectionEnabled: false,
  autounselectify: true,
  locked: true,

  style: cytoscape.stylesheet()
    .selector('node')
      .css({
    	  'content': 'data(id)',
    	  //'text-valign': 'center',
    	  //'color': '#000000',
    	  //'text-outline-width': 1,
    	  'text-outline-color': '#888',
    	  'background-color': '#8abdac',
        'height': 60,
        'width': 60,
        'background-fit': 'cover',
        'border-color': '#000',
        'border-width': 3,
        'border-opacity': 0.5
      })
    .selector('.eating')
      .css({
        'border-color': 'red'
      })
    .selector('.eater')
      .css({
        'border-width': 1
      })
    .selector('edge')
      .css({
        'curve-style': 'bezier',
        'width': 5,
        'target-arrow-shape': 'triangle',
        'line-color': '#ffaaaa',
        'target-arrow-color': '#ffaaaa'
      }),
  elements: data,

  layout: {
    name: 'breadthfirst',
    directed: true,
    padding: 10
  }
}); // cy init
cy.zoom({
	  level: 1.0, // the zoom level
	  renderedPosition: { x: 100, y: 100 }
	});
//photos from flickr with creative commons license




